package com.sinosoft.jwjw.utils;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class ResultPage {

    private int code;

    private String msg;

    private String innermsg;

    private Integer pageIndex;

    private Integer pageSize;

    private Long allcount;

    private JSONArray result;


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getInnermsg() {
        return innermsg;
    }

    public void setInnermsg(String innermsg) {
        this.innermsg = innermsg;
    }

    public Integer getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(Integer pageIndex) {
        this.pageIndex = pageIndex;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Long getAllcount() {
        return allcount;
    }

    public void setAllcount(Long allcount) {
        this.allcount = allcount;
    }

    public JSONArray getResult() {
        return result;
    }

    public void setResult(JSONArray result) {
        this.result = result;
    }

    @Override
    public String toString() {

        if(result == null)
            result = new JSONArray();

        JSONObject jo = new JSONObject();
        jo.put("code", code);
        jo.put("msg", msg);
        jo.put("innermsg", innermsg);
        jo.put("pageIndex", pageIndex);
        jo.put("pageSize", pageSize);
        jo.put("allcount", allcount);
        jo.put("result", result);

        return jo.toString();
    }
}
